package com.financing.wap.dao.impl;


import java.sql.SQLException;
import java.util.List;

import org.springframework.stereotype.Repository;

import com.financing.wap.common.SqlName;
import com.financing.wap.dao.IDstArticleShareLogDao;
import com.financing.wap.dto.DstArticleShareLogDTO;
/**
 * dst_article_share_log  
 * 分享记录 数据访问层实现类
 * @author huqiyun
 *
 */
 
@Repository("dstArticleShareLogDao")
public class DstArticleShareLogDaoImpl extends BaseDaoImpl<DstArticleShareLogDTO, java.lang.Integer> implements IDstArticleShareLogDao {


	@Override
	public int insert(DstArticleShareLogDTO dstArticleShareLog) throws SQLException {
		return (Integer) this.sqlMapClientTemplate.insert(SqlName.DstArticleShareLogSql.insert, dstArticleShareLog);
	}

	@Override
	public void update(DstArticleShareLogDTO dstArticleShareLog) throws SQLException {
		this.sqlMapClientTemplate.update(SqlName.DstArticleShareLogSql.update, dstArticleShareLog);
	}

	@Override
	public void updateForce(DstArticleShareLogDTO dstArticleShareLog) throws SQLException {
		this.sqlMapClientTemplate.update(SqlName.DstArticleShareLogSql.updateForce, dstArticleShareLog);
	}

	@Override
	public void delete(Integer id) throws SQLException {
		this.sqlMapClientTemplate.delete(SqlName.DstArticleShareLogSql.delete,id);
	}
	
	@SuppressWarnings("unchecked")	
	@Override
	public List<DstArticleShareLogDTO> queryList(DstArticleShareLogDTO dstArticleShareLog) throws SQLException {
		return this.sqlMapClientTemplate.queryForList(SqlName.DstArticleShareLogSql.queryList, dstArticleShareLog);
	}

	@Override
	public int queryListCount(DstArticleShareLogDTO dstArticleShareLog) throws SQLException {
		return (Integer) this.sqlMapClientTemplate.queryForObject(SqlName.DstArticleShareLogSql.queryListCount, dstArticleShareLog);
	}

	@Override
	public DstArticleShareLogDTO loadById(Integer id) throws SQLException {
		return  (DstArticleShareLogDTO)this.getSqlMapClientTemplate().queryForObject(SqlName.DstArticleShareLogSql.loadById,id);
	}

	@Override
	public Class<DstArticleShareLogDTO> getEntityClass() {
		return DstArticleShareLogDTO.class;
	}
 	
}
